//递归获取ID
export function setCategoysTreeId(allcategory,blsCatalogId, id) {
    allcategory.forEach(item=>{
    if(item.ID==id)
      {
        blsCatalogId.push(item.ID);
        if(item.PID!='0')
        {
          setCategoysTreeId(allcategory,blsCatalogId,item.PID);
        }
      }
    }); 
}

export function getCategoysTreeId(allcategory , id) {

    var  blsCatalogId=[]
    setCategoysTreeId(allcategory, blsCatalogId, id);
    return  blsCatalogId.reverse();
}
